Optimal. Leaf size=119 \[ \frac {\left (8 a^2-4 a b+b^2\right ) \sinh (c+d x) \cosh (c+d x)}{16 d}+\frac {1}{16} x \left (8 a^2-4 a b+b^2\right )+\frac {b (8 a-3 b) \sinh (c+d x) \cosh ^3(c+d x)}{24 d}+\frac {b \sinh (c+d x) \cosh ^5(c+d x) \left (a-(a-b) \tanh ^2(c+d x)\right )}{6 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.14, antiderivative size = 119, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {3191, 413, 385, 199, 206} \[ \frac {\left (8 a^2-4 a b+b^2\right ) \sinh (c+d x) \cosh (c+d x)}{16 d}+\frac {1}{16} x \left (8 a^2-4 a b+b^2\right )+\frac {b (8 a-3 b) \sinh (c+d x) \cosh ^3(c+d x)}{24 d}+\frac {b \sinh (c+d x) \cosh ^5(c+d x) \left (a-(a-b) \tanh ^2(c+d x)\right )}{6 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 199
Rule 206
Rule 385
Rule 413
Rule 3191
Rubi steps
\begin {align*} \int \cosh ^2(c+d x) \left (a+b \sinh ^2(c+d x)\right )^2 \, dx &=\frac {\operatorname {Subst}\left (\int \frac {\left (a-(a-b) x^2\right )^2}{\left (1-x^2\right )^4} \, dx,x,\tanh (c+d x)\right )}{d}\\ &=\frac {b \cosh ^5(c+d x) \sinh (c+d x) \left (a-(a-b) \tanh ^2(c+d x)\right )}{6 d}-\frac {\operatorname {Subst}\left (\int \frac {-a (6 a-b)+3 (a-b) (2 a-b) x^2}{\left (1-x^2\right )^3} \, dx,x,\tanh (c+d x)\right )}{6 d}\\ &=\frac {(8 a-3 b) b \cosh ^3(c+d x) \sinh (c+d x)}{24 d}+\frac {b \cosh ^5(c+d x) \sinh (c+d x) \left (a-(a-b) \tanh ^2(c+d x)\right )}{6 d}+\frac {\left (8 a^2-4 a b+b^2\right ) \operatorname {Subst}\left (\int \frac {1}{\left (1-x^2\right )^2} \, dx,x,\tanh (c+d x)\right )}{8 d}\\ &=\frac {\left (8 a^2-4 a b+b^2\right ) \cosh (c+d x) \sinh (c+d x)}{16 d}+\frac {(8 a-3 b) b \cosh ^3(c+d x) \sinh (c+d x)}{24 d}+\frac {b \cosh ^5(c+d x) \sinh (c+d x) \left (a-(a-b) \tanh ^2(c+d x)\right )}{6 d}+\frac {\left (8 a^2-4 a b+b^2\right ) \operatorname {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\tanh (c+d x)\right )}{16 d}\\ &=\frac {1}{16} \left (8 a^2-4 a b+b^2\right ) x+\frac {\left (8 a^2-4 a b+b^2\right ) \cosh (c+d x) \sinh (c+d x)}{16 d}+\frac {(8 a-3 b) b \cosh ^3(c+d x) \sinh (c+d x)}{24 d}+\frac {b \cosh ^5(c+d x) \sinh (c+d x) \left (a-(a-b) \tanh ^2(c+d x)\right )}{6 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.29, size = 79, normalized size = 0.66 \[ \frac {12 \left (8 a^2-4 a b+b^2\right ) (c+d x)+3 \left (16 a^2-b^2\right ) \sinh (2 (c+d x))+3 b (4 a-b) \sinh (4 (c+d x))+b^2 \sinh (6 (c+d x))}{192 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 2.22, size = 143, normalized size = 1.20 \[ \frac {3 \, b^{2} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{5} + 2 \, {\left (5 \, b^{2} \cosh \left (d x + c\right )^{3} + 3 \, {\left (4 \, a b - b^{2}\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )^{3} + 6 \, {\left (8 \, a^{2} - 4 \, a b + b^{2}\right )} d x + 3 \, {\left (b^{2} \cosh \left (d x + c\right )^{5} + 2 \, {\left (4 \, a b - b^{2}\right )} \cosh \left (d x + c\right )^{3} + {\left (16 \, a^{2} - b^{2}\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )}{96 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.16, size = 149, normalized size = 1.25 \[ \frac {1}{16} \, {\left (8 \, a^{2} - 4 \, a b + b^{2}\right )} x + \frac {b^{2} e^{\left (6 \, d x + 6 \, c\right )}}{384 \, d} - \frac {b^{2} e^{\left (-6 \, d x - 6 \, c\right )}}{384 \, d} + \frac {{\left (4 \, a b - b^{2}\right )} e^{\left (4 \, d x + 4 \, c\right )}}{128 \, d} + \frac {{\left (16 \, a^{2} - b^{2}\right )} e^{\left (2 \, d x + 2 \, c\right )}}{128 \, d} - \frac {{\left (16 \, a^{2} - b^{2}\right )} e^{\left (-2 \, d x - 2 \, c\right )}}{128 \, d} - \frac {{\left (4 \, a b - b^{2}\right )} e^{\left (-4 \, d x - 4 \, c\right )}}{128 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.08, size = 134, normalized size = 1.13 \[ \frac {b^{2} \left (\frac {\left (\sinh ^{3}\left (d x +c \right )\right ) \left (\cosh ^{3}\left (d x +c \right )\right )}{6}-\frac {\sinh \left (d x +c \right ) \left (\cosh ^{3}\left (d x +c \right )\right )}{8}+\frac {\cosh \left (d x +c \right ) \sinh \left (d x +c \right )}{16}+\frac {d x}{16}+\frac {c}{16}\right )+2 a b \left (\frac {\sinh \left (d x +c \right ) \left (\cosh ^{3}\left (d x +c \right )\right )}{4}-\frac {\cosh \left (d x +c \right ) \sinh \left (d x +c \right )}{8}-\frac {d x}{8}-\frac {c}{8}\right )+a^{2} \left (\frac {\cosh \left (d x +c \right ) \sinh \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.34, size = 171, normalized size = 1.44 \[ \frac {1}{8} \, a^{2} {\left (4 \, x + \frac {e^{\left (2 \, d x + 2 \, c\right )}}{d} - \frac {e^{\left (-2 \, d x - 2 \, c\right )}}{d}\right )} - \frac {1}{384} \, b^{2} {\left (\frac {{\left (3 \, e^{\left (-2 \, d x - 2 \, c\right )} + 3 \, e^{\left (-4 \, d x - 4 \, c\right )} - 1\right )} e^{\left (6 \, d x + 6 \, c\right )}}{d} - \frac {24 \, {\left (d x + c\right )}}{d} - \frac {3 \, e^{\left (-2 \, d x - 2 \, c\right )} + 3 \, e^{\left (-4 \, d x - 4 \, c\right )} - e^{\left (-6 \, d x - 6 \, c\right )}}{d}\right )} - \frac {1}{32} \, a b {\left (\frac {8 \, {\left (d x + c\right )}}{d} - \frac {e^{\left (4 \, d x + 4 \, c\right )}}{d} + \frac {e^{\left (-4 \, d x - 4 \, c\right )}}{d}\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.22, size = 95, normalized size = 0.80 \[ \frac {12\,a^2\,\mathrm {sinh}\left (2\,c+2\,d\,x\right )-\frac {3\,b^2\,\mathrm {sinh}\left (2\,c+2\,d\,x\right )}{4}-\frac {3\,b^2\,\mathrm {sinh}\left (4\,c+4\,d\,x\right )}{4}+\frac {b^2\,\mathrm {sinh}\left (6\,c+6\,d\,x\right )}{4}+3\,a\,b\,\mathrm {sinh}\left (4\,c+4\,d\,x\right )+24\,a^2\,d\,x+3\,b^2\,d\,x-12\,a\,b\,d\,x}{48\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 3.54, size = 314, normalized size = 2.64 \[ \begin {cases} - \frac {a^{2} x \sinh ^{2}{\left (c + d x \right )}}{2} + \frac {a^{2} x \cosh ^{2}{\left (c + d x \right )}}{2} + \frac {a^{2} \sinh {\left (c + d x \right )} \cosh {\left (c + d x \right )}}{2 d} - \frac {a b x \sinh ^{4}{\left (c + d x \right )}}{4} + \frac {a b x \sinh ^{2}{\left (c + d x \right )} \cosh ^{2}{\left (c + d x \right )}}{2} - \frac {a b x \cosh ^{4}{\left (c + d x \right )}}{4} + \frac {a b \sinh ^{3}{\left (c + d x \right )} \cosh {\left (c + d x \right )}}{4 d} + \frac {a b \sinh {\left (c + d x \right )} \cosh ^{3}{\left (c + d x \right )}}{4 d} - \frac {b^{2} x \sinh ^{6}{\left (c + d x \right )}}{16} + \frac {3 b^{2} x \sinh ^{4}{\left (c + d x \right )} \cosh ^{2}{\left (c + d x \right )}}{16} - \frac {3 b^{2} x \sinh ^{2}{\left (c + d x \right )} \cosh ^{4}{\left (c + d x \right )}}{16} + \frac {b^{2} x \cosh ^{6}{\left (c + d x \right )}}{16} + \frac {b^{2} \sinh ^{5}{\left (c + d x \right )} \cosh {\left (c + d x \right )}}{16 d} + \frac {b^{2} \sinh ^{3}{\left (c + d x \right )} \cosh ^{3}{\left (c + d x \right )}}{6 d} - \frac {b^{2} \sinh {\left (c + d x \right )} \cosh ^{5}{\left (c + d x \right )}}{16 d} & \text {for}\: d \neq 0 \\x \left (a + b \sinh ^{2}{\relax (c )}\right )^{2} \cosh ^{2}{\relax (c )} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________